package com.example.hxpc.guidancemanagement.tools.mold;

import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.view.View;
import android.view.WindowManager;
import android.widget.PopupWindow;


/**
 * Created by tao on 2017/12/4.
 */

public class BasePopupWindow  extends PopupWindow {
    public BasePopupWindow(View contentView, int width, int height, boolean focusable,
                           boolean outsideTouchable, boolean touchable, boolean clippingEnabled) {
        super(contentView, width, height, focusable);
        setBackgroundDrawable(new ColorDrawable(Color.parseColor("#00000000")));
        setFocusable(focusable);
        setOutsideTouchable(outsideTouchable);
        setTouchable(touchable);
        setClippingEnabled(clippingEnabled);
        setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
    }

    @Override
    public void setBackgroundDrawable(Drawable background) {
        super.setBackgroundDrawable(background);
    }

    @Override
    public void setFocusable(boolean focusable) {
        super.setFocusable(focusable);
    }

    @Override
    public void setTouchable(boolean touchable) {
        super.setTouchable(touchable);
    }

    @Override
    public void setOutsideTouchable(boolean touchable) {
        super.setOutsideTouchable(touchable);
    }

    @Override
    public void setClippingEnabled(boolean enabled) {
        super.setClippingEnabled(enabled);
    }

    @Override
    public void showAsDropDown(View anchor, int xoff, int yoff, int gravity) {
        super.showAsDropDown(anchor, xoff, yoff, gravity);
    }
}
